home *** CD-ROM | disk | FTP | other *** search
- Path: mics.demon.co.uk!Bill
- From: Bill Michell <Bill@mics.demon.co.uk>
- Newsgroups: comp.lang.c++
- Subject: Re: novice question on copy constru
- Date: Sun, 11 Feb 1996 00:27:05 +0000
- Organization: None
- Distribution: world
- Message-ID: <AL9SoXAZfTHxEwVN@mics.demon.co.uk>
- References: <4efpie$jsq@news.ust.hk>
- NNTP-Posting-Host: mics.demon.co.uk
- X-NNTP-Posting-Host: mics.demon.co.uk
- MIME-Version: 1.0
- X-Newsreader: Turnpike Version 1.11 <uiEOes1orVXTvvWgSAnAOBUy+p>
-
- In article <4efpie$jsq@news.ust.hk>, Chan Ka Ming
- <ee_ckmaa@uxmail.ust.hk> writes
- >I don't understand why one should create a copy constructor. Doesn't the
- >computer will do the job for you when pass arguments by value? Thanks
- >
- >
- You only need to supply a non-default copy coinstructor if your object
- includes pointers (correct me if I'm wrong) to anything. Even ten, it is
- not always necessary. Any standard text on C++ will explain when copy
- constructors are needed.
-